home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 1 / CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso / Aminet / comm / tcp / AmiTCPsdk_40.lha / AmiTCP-4.0 / netinclude / lineread.h < prev    next >
C/C++ Source or Header  |  1994-10-03  |  1KB  |  52 lines

  1. #ifndef LINEREAD_H
  2. #define LINEREAD_H \
  3.        "$Id: lineread.h,v 4.1 1994/10/03 20:52:20 ppessi Exp $"
  4. /*
  5.  *      Effective routines for reading line formatted data from network
  6.  *
  7.  *      Copyright © 1994 AmiTCP/IP Group,
  8.  *                       Network Solutions Development, Inc.
  9.  *                       All rights reserved.
  10.  */
  11.  
  12. /* #include <sys/cdefs.h> */
  13.  
  14. #ifndef RL_BUFSIZE
  15. #define RL_BUFSIZE 1024
  16. #endif
  17.  
  18. struct rl_private {
  19. /*  struct Library * rlp_SocketBase; */
  20.   int        rlp_Startp;
  21.   int        rlp_Bufpointer;
  22.   int        rlp_Howlong;
  23.   int         rlp_Buffersize;
  24. #define bool int
  25.   bool         rlp_Line_completed;
  26.   bool         rlp_Selected;
  27. #undef bool  
  28.   char       rlp_Saved;
  29.   char       rlp_Buffer[RL_BUFSIZE + 1];
  30. };
  31.  
  32. struct LineRead {
  33.   char *                            rl_Line;
  34.   enum {RL_LFNOTREQ = 0, RL_LFREQLF = 1, RL_LFREQNUL = 2}    rl_Lftype;
  35.   int                                rl_Fd;
  36.   struct rl_private                        rl_Private;
  37. };
  38.  
  39. /*__BEGIN_DECLS
  40.   
  41. int    lineRead __P((struct LineRead * rl));
  42. void    initLineRead __P((struct LineRead * rl, int fd,
  43.               int lftype, int buffersize));
  44.  
  45. __END_DECLS */
  46.  
  47. int    lineRead (struct LineRead * rl);
  48. void    initLineRead (struct LineRead * rl, int fd,
  49.               int lftype, int buffersize);
  50.  
  51. #endif /* LINEREAD_H */
  52.